import { defineStore } from "pinia";
import { ref } from "vue";

export const useDeviceStore = defineStore("device", () => {
  const device = ref("");
  const lang = ref("en-US");
  const MyShop = ref(null);
  const setLang = (lan) => {
    lang.value = lan;
  };
  const setDevice = (data) => {
    device.value;
  };
  const setShop = (data) => {
    uni.setStorage({
      key: "MyShop",
      data: data,
      success: function () {
        console.log("success");
      },
    });
    MyShop.value = data;
  };
  return {
    device,
    MyShop,
    setShop,
    setLang,
    lang,
  };
});
